﻿<%@ Page Language="C#" MasterPageFile="~/DigitalTV.Master" AutoEventWireup="true" CodeBehind="ManterUsuario.aspx.cs" Inherits="UI.ManterUsuario" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 440px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div id = "Principal" style="width:499px; height: 544px;">
        
        <div id="lista" style="width:499px; height:300px; border: solid 1px #000; margin: 5px 0px 5px;">
            <table width="100%" cellpadding="2" cellspacing="2" style="background: #FFF" cellpadding="2" cellspacing="2">
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Login: "></asp:Label>
                        <asp:TextBox ID="tx_consultar" runat="server"></asp:TextBox>
                         <asp:DropDownList ID="nr_tipo_consult" runat="server">
                            <asp:ListItem Value="" Selected="True">Qualquer</asp:ListItem>
                            <asp:ListItem Value="0">Gerente</asp:ListItem>
                            <asp:ListItem Value="1">Funcionario</asp:ListItem>
                            <asp:ListItem Value="2">Cliente</asp:ListItem>
                        </asp:DropDownList>
                       
                        <asp:Button ID="bt_consulta" runat="server" Text="Consultar" 
                            style="vertical-align:top; margin-left:5px;" CssClass="divDados" 
                            Height="22px" Width="68px" onclick="bt_consulta_Click"/>
                            
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="tx_sucess" runat="server" style="color:Green"></asp:Label>
                    </td>
                </tr>
                </table>
        
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" 
                GridLines="None">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" Width="100%" />
                <Columns>
                    <asp:BoundField DataField="Login" HeaderText="Login" SortExpression="Login" />
                    <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                    <asp:BoundField DataField="TipoString" HeaderText="Tipo" SortExpression="Tipo" />
                   
                    <asp:TemplateField HeaderText="Alterar">
                        <ItemTemplate>
                            <asp:LinkButton ID="bt_alterar" runat="server" onclick="bt_alterar_Click">Alterar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Remover">
                        <ItemTemplate>
                            <asp:LinkButton ID="bt_remover" runat="server" onclick="bt_remover_Click">Remover</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        
        
        
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                DataObjectTypeName="Negocios.UsuarioBO" InsertMethod="Inserir" 
                OldValuesParameterFormatString="original_{0}" SelectMethod="Consultar" 
                TypeName="Negocios.UsuarioBoMetodos">
                <SelectParameters>
                    <asp:Parameter DefaultValue="" Name="nome" Type="String" />
                    <asp:Parameter DefaultValue="" Name="tipo" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        
        
        
        </div>
        <div id = "Consulta" style="width:501px">
            <table border="1" style="background: #FFF" cellpadding="2" cellspacing="2">
                <tr>
                    <td>
                        <asp:Button ID="bt_novo" runat="server" Text="Novo" onclick="bt_novo_Click"  />
                    </td>
                    <td>
                        <asp:Label ID="tx_err" runat="server" style="color:Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        Login:&nbsp; 
                    </td>
                    <td class="style1">
                       
                        <asp:TextBox ID="tx_login" runat="server" Enabled="False" ></asp:TextBox>
                       
                    </td>
                </tr>
                <tr>
                    <td>
                        Nome:&nbsp;
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="tx_nome" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Email:&nbsp;
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="tx_email" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Senha:&nbsp;
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="tx_senha" runat="server" Enabled="False" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Confirme a Senha:&nbsp;
                    </td>
                    <td class="style1">
                        <asp:TextBox ID="tx_senha_confirm" runat="server" Enabled="False" TextMode="Password"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Tipo:&nbsp;
                    </td>
                    <td class="style1">
                        <asp:DropDownList ID="nr_tipo" runat="server" Enabled="False">
                            <asp:ListItem Value="0">Gerente</asp:ListItem>
                            <asp:ListItem Value="1">Funcionario</asp:ListItem>
                            <asp:ListItem Selected="True" Value="2">Cliente</asp:ListItem>
                        </asp:DropDownList>
                       
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="bt_salvar" runat="server" Text="Salvar" Enabled="False" 
                            onclick="bt_salvar_Click" />
                        <asp:Button ID="bt_cancelar" runat="server" Text="Cancelar" Enabled="False" 
                            onclick="bt_cancelar_Click" />
                    </td>
               </tr>
            </table>
        </div>
    </div> 
</asp:Content>
